home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-25 | 26.3 KB | 83 lines | [TEXT/MPS ] |
- /* --------------------------------------------------------------------------
- * output.c: Copyright (c) Mark P Jones 1991-1993. All rights reserved.
- * See goferite.h for details and conditions of use etc...
- * Gofer version 2.28 January 1993
- *
- * Unparse expressions and types - for use in error messages, type checker
- * and for debugging.
- * ------------------------------------------------------------------------*/
-
- #ifndef GOFC_OUTPUT
- #include "prelude.h"
- #include "storage.h"
- #include "connect.h"
- #include "errors.h"
-
- #if MPW
- #include "mac_ctype.h" /* We need our special ctype macros for the Mac */
- #pragma segment Output
-
- #else
- #include <ctype.h>
- #endif
-
- #endif
-
- Bool traceEval = FALSE; /* TRUE => display evaluation */
-
- /* --------------------------------------------------------------------------
- * Local function prototypes:
- * ------------------------------------------------------------------------*/
-
- static Void local putChr Args((Int));
- static Void local putStr Args((String));
- static Void local putInt Args((Int));
- static Void local indent Args((Int));
-
- static Void local put Args((Int,Cell));
- static Void local putComp Args((Cell,List));
- static Void local putQual Args((Cell));
- static Bool local isDictVal Args((Cell));
- static Cell local maySkipDict Args((Cell));
- static Void local putAp Args((Int,Cell));
- static Void local putOverInfix Args((Int,Text,Syntax,Cell));
- static Void local putInfix Args((Int,Text,Syntax,Cell,Cell));
- static Void local putSimpleAp Args((Cell));
- static Void local putTuple Args((Int,Cell));
- static Int local unusedTups Args((Int,Cell));
- static Void local unlexVar Args((Text));
- static Void local unlexOp Args((Text));
- static Void local unlexCharConst Args((Cell));
- static Void local unlexStrConst Args((Text));
-
- #ifdef GOFC_OUTPUT
- static Void local pPut Args((Int,Cell,Int));
- static Void local pPutAp Args((Int,Cell,Int));
- static Void local pPutSimpleAp Args((Cell,Int));
- static Void local pPutTuple Args((Int,Cell,Int));
- static Int local punusedTups Args((Int,Cell,Int));
- static Void local pPutOffset Args((Int));
- static Int local pPutLocals Args((List,Int));
- static Void local pLiftedStart Args((Cell,Int,String));
- static Void local pLifted Args((Cell,Int,String));
- static Int local pDiscr Args((Cell,Int));
- #endif
-
- static Void local putSigType Args((Cell));
- static Void local putContext Args((List));
- static Void local putPred Args((Cell));
- static Void local putType Args((Cell,Int));
- static Void local putTyVar Args((Int));
- static Bool local putTupleType Args((Cell));
- static Void local putApType Args((Type));
-
- static Void local putKind Args((Kind));
- static Void local putSig Args((Cell));
-
- /* --------------------------------------------------------------------------
- * Basic output routines:
- * ------------------------------------------------------------------------*/
-
- static FILE *outputStream; /* current output stream */
- static Int outColumn = 0; /* current output column number */
- Bool showDicts = FALSE;